import numpy as np
import cPickle

pkl_file_s = open('single.pkl', 'rb')
pkl_file_d = open('double.pkl', 'rb')

pklist_s = cPickle.load(pkl_file_s)
pklist_d = cPickle.load(pkl_file_d)

for s,d in zip(pklist_s,pklist_d):
    print d.shape
    m = np.abs(d).max()
    e = np.abs(s-d).max()
    print 'magnitude is', m 
    print 'error is', e 
    print 'percent difference is', e/m*100
    
